package com.utn.ab.user.service.impl;

import com.utn.ab.user.entity.User;
import com.utn.ab.user.mapper.UserMapper;
import com.utn.ab.user.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.UUID;

/**
 * @创建人 liuchunlin
 * @创建时间 9:45
 * @描述
 */
@Service
public class UserInfoServiceImpl implements UserInfoService {

    @Autowired
    private UserMapper userMapper;

    public void join(User user){
        long time = System.currentTimeMillis();
        String id = UUID.randomUUID().toString();

        user.setId(id);
        user.setCreateTime(time);
        user.setUpdateTime(time);
        user.setState(0);

        userMapper.save(user);
    }

    @Override
    public String authByForm(String username, String password) {
        return null;
    }

    @Override
    public String authByMobile(String mobile) {
        return null;
    }
}
